package com.kerrykidz.scminvoicing.dao.model;

import java.util.Date;
import java.util.List;

import com.rdp.framework.core.model.MyBatisSuperModel;
import com.rdp.framework.exception.RDPException;
import com.rdp.util.time.DateFormatUtil;

public class ScmSupAgmEntity extends MyBatisSuperModel {
    private String pkSupagmId;
    private String fkSupId;
    private Date agmFrom;
    private Date agmTo;
    private String fkAgmFile;
    private String comments;
    private String delFlag;
    private String modiBy;
    private Date modiTime;
    //业务扩张字段
    //协议的开始时间和结束时间
    private String startTime;
    private String endTime;
    private String fkBranId;
    private String isFirst;//是否为直接添加协议
    private List<String> idAndPrice;
    private List<String> addInfo;
    private List<String> updateInfo;
    
	public List<String> getAddInfo() {
		return addInfo;
	}

	public void setAddInfo(List<String> addInfo) {
		this.addInfo = addInfo;
	}

	public List<String> getUpdateInfo() {
		return updateInfo;
	}

	public void setUpdateInfo(List<String> updateInfo) {
		this.updateInfo = updateInfo;
	}

	public String getIsFirst() {
		return isFirst;
	}

	public void setIsFirst(String isFirst) {
		this.isFirst = isFirst;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getFkBranId() {
		return fkBranId;
	}

	public void setFkBranId(String fkBranId) {
		this.fkBranId = fkBranId;
	}

	public List<String> getIdAndPrice() {
		return idAndPrice;
	}

	public void setIdAndPrice(List<String> idAndPrice) {
		this.idAndPrice = idAndPrice;
	}

	public String getStartTime() throws RDPException {
		Date date=this.getAgmFrom();
		if(date!=null){
			String nowTime=DateFormatUtil.convertDateToStr(new Date(date.getTime()),"YYYY-MM-dd");
			return nowTime;
		}
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() throws RDPException {
		Date date=this.getAgmTo();
		if(date!=null){
			String nowTime=DateFormatUtil.convertDateToStr(new Date(date.getTime()),"YYYY-MM-dd");
			return nowTime;
		}
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getPkSupagmId() {
        return pkSupagmId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.PK_SUPAGM_ID
     *
     * @param pkSupagmId the value for scm_sup_agm.PK_SUPAGM_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setPkSupagmId(String pkSupagmId) {
        this.pkSupagmId = pkSupagmId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.FK_SUP_ID
     *
     * @return the value of scm_sup_agm.FK_SUP_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getFkSupId() {
        return fkSupId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.FK_SUP_ID
     *
     * @param fkSupId the value for scm_sup_agm.FK_SUP_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkSupId(String fkSupId) {
        this.fkSupId = fkSupId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.AGM_FROM
     *
     * @return the value of scm_sup_agm.AGM_FROM
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public Date getAgmFrom() {
        return agmFrom;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.AGM_FROM
     *
     * @param agmFrom the value for scm_sup_agm.AGM_FROM
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setAgmFrom(Date agmFrom) {
        this.agmFrom = agmFrom;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.AGM_TO
     *
     * @return the value of scm_sup_agm.AGM_TO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public Date getAgmTo() {
        return agmTo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.AGM_TO
     *
     * @param agmTo the value for scm_sup_agm.AGM_TO
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setAgmTo(Date agmTo) {
        this.agmTo = agmTo;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.FK_AGM_FILE
     *
     * @return the value of scm_sup_agm.FK_AGM_FILE
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getFkAgmFile() {
        return fkAgmFile;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.FK_AGM_FILE
     *
     * @param fkAgmFile the value for scm_sup_agm.FK_AGM_FILE
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkAgmFile(String fkAgmFile) {
        this.fkAgmFile = fkAgmFile;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.COMMENTS
     *
     * @return the value of scm_sup_agm.COMMENTS
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getComments() {
        return comments;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.COMMENTS
     *
     * @param comments the value for scm_sup_agm.COMMENTS
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setComments(String comments) {
        this.comments = comments;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.MODI_BY
     *
     * @return the value of scm_sup_agm.MODI_BY
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getModiBy() {
        return modiBy;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.MODI_BY
     *
     * @param modiBy the value for scm_sup_agm.MODI_BY
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setModiBy(String modiBy) {
        this.modiBy = modiBy;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_agm.MODI_TIME
     *
     * @return the value of scm_sup_agm.MODI_TIME
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public Date getModiTime() {
        return modiTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_agm.MODI_TIME
     *
     * @param modiTime the value for scm_sup_agm.MODI_TIME
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setModiTime(Date modiTime) {
        this.modiTime = modiTime;
    }
}